/**
 * 工具主题配置
 * 统一管理所有工具的颜色主题和视觉样式
 */

export const TOOL_THEMES = {
	// 主色调配置
	primary: {
		gradient: ['#6A82FB', '#FC5C7D'],
		color: '#6A82FB',
		textColor: '#FFFFFF'
	},
	
	// 工具分类主题
	daily: {
		gradient: ['#4A90E2', '#357ABD'],
		color: '#4A90E2',
		textColor: '#FFFFFF'
	},
	
	fortune: {
		gradient: ['#F5A623', '#E68B00'],
		color: '#F5A623',
		textColor: '#FFFFFF'
	},
	
	life: {
		gradient: ['#BD10E0', '#9013FE'],
		color: '#BD10E0',
		textColor: '#FFFFFF'
	},
	
	relationship: {
		gradient: ['#FF6B9D', '#E91E63'],
		color: '#FF6B9D',
		textColor: '#FFFFFF'
	},
	
	divination: {
		gradient: ['#9C27B0', '#7B1FA2'],
		color: '#9C27B0',
		textColor: '#FFFFFF'
	},
	
	study: {
		gradient: ['#FF9500', '#F57C00'],
		color: '#FF9500',
		textColor: '#FFFFFF'
	}
}

// 评分等级颜色配置
export const SCORE_COLORS = {
	excellent: {
		gradient: ['#4CAF50', '#388E3C'],
		color: '#4CAF50',
		level: '极佳'
	},
	good: {
		gradient: ['#2196F3', '#1976D2'],
		color: '#2196F3',
		level: '良好'
	},
	average: {
		gradient: ['#FF9800', '#F57C00'],
		color: '#FF9800',
		level: '一般'
	},
	poor: {
		gradient: ['#F44336', '#D32F2F'],
		color: '#F44336',
		level: '较差'
	}
}

// 根据分数获取颜色主题
export function getScoreTheme(score) {
	if (score >= 90) return SCORE_COLORS.excellent
	if (score >= 75) return SCORE_COLORS.good
	if (score >= 60) return SCORE_COLORS.average
	return SCORE_COLORS.poor
}

// 根据工具类别获取主题
export function getToolTheme(category) {
	return TOOL_THEMES[category] || TOOL_THEMES.primary
}

// 通用动画配置
export const ANIMATIONS = {
	// 页面进入动画
	pageEnter: {
		duration: 300,
		timingFunction: 'ease-out'
	},
	
	// 卡片点击动画
	cardPress: {
		duration: 150,
		timingFunction: 'ease-in-out'
	},
	
	// 结果显示动画
	resultShow: {
		duration: 500,
		timingFunction: 'ease-out',
		delay: 100
	}
}

// 通用尺寸配置
export const SIZES = {
	// 间距
	spacing: {
		xs: '8rpx',
		sm: '16rpx',
		md: '24rpx',
		lg: '32rpx',
		xl: '48rpx'
	},
	
	// 圆角
	radius: {
		sm: '8rpx',
		md: '12rpx',
		lg: '16rpx',
		xl: '20rpx',
		round: '50%'
	},
	
	// 字体大小
	fontSize: {
		xs: '20rpx',
		sm: '24rpx',
		md: '28rpx',
		lg: '32rpx',
		xl: '36rpx',
		xxl: '40rpx'
	}
}

export default {
	TOOL_THEMES,
	SCORE_COLORS,
	getScoreTheme,
	getToolTheme,
	ANIMATIONS,
	SIZES
}